package factory;

import java.util.ArrayList;
import java.util.HashMap;

import occupation.Occupation;
import occupation.OccupationType;
import skills.ActiveSkill;
import skills.Skill;
import stat.EntityStatList;
import stat.StatList;
import stat.StatType;

public class OccupationInitializer {
	
	public static void initOccupationFactory() {
		// Avatar Occupations
	
		// Smasher
		StatList smasherStats = new EntityStatList();
		smasherStats.addStat( StatType.STR, 5 );
		smasherStats.addStat( StatType.HAR, 5 );
		
		ArrayList<ActiveSkill> smasherSkills = new ArrayList<ActiveSkill>();
		ActiveSkill oneHanded = SkillFactory.createActiveSkill( "oneHanded" );
		ActiveSkill twoHanded = SkillFactory.createActiveSkill( "twoHanded" );
		ActiveSkill brawler = SkillFactory.createActiveSkill( "brawler" );
		ActiveSkill unarmed = SkillFactory.createActiveSkill( "unarmed" );
		
		smasherSkills.add( oneHanded );
		smasherSkills.add( twoHanded );
		smasherSkills.add( brawler );
		smasherSkills.add( unarmed );
//		smasherSkills.add( SkillFactory.createActiveSkill( "berserk" ) );
		smasherSkills.add( SkillFactory.createActiveSkill( "LOD" ) );
		smasherSkills.add( SkillFactory.createActiveSkill( "bindWounds" ) );
		
		ArrayList<Skill> smasherSkills2 = new ArrayList<Skill>();
//		smasherSkills2.add( SkillFactory.createSkill( "observation" ) );
//		smasherSkills2.add( SkillFactory.createSkill( "bargain" ) );
		
		HashMap< String, ActiveSkill > weaponSkills = new HashMap<String, ActiveSkill>();
		weaponSkills.put("oneHanded", oneHanded);
		weaponSkills.put("twoHanded", twoHanded);
		weaponSkills.put("brawler", brawler);
		weaponSkills.put("unarmed", unarmed);
		
		Occupation smasher = new Occupation( smasherStats, OccupationType.SMASHER, smasherSkills, weaponSkills, smasherSkills2 );
		OccupationFactory.addOccupation( smasher );
		
		// Summoner
		StatList summonerStats = new EntityStatList();
		summonerStats.addStat( StatType.INT, 5 );
		summonerStats.addStat( StatType.AGI, 5 );
		
		ArrayList<ActiveSkill> summonerSkills = new ArrayList<ActiveSkill>();
		ActiveSkill staff = SkillFactory.createActiveSkill( "staff" );
		
		summonerSkills.add( staff );
		summonerSkills.add( unarmed );
		summonerSkills.add( SkillFactory.createActiveSkill( "fireBall" ) );
		summonerSkills.add( SkillFactory.createActiveSkill( "iceWave" ) );
		summonerSkills.add( SkillFactory.createActiveSkill( "earthQuake" ) );
		summonerSkills.add( SkillFactory.createActiveSkill( "healingLight" ) );
//		summonerSkills.add( SkillFactory.createActiveSkill( "protect" ) );
		summonerSkills.add( SkillFactory.createActiveSkill( "bindWounds" ) );
		summonerSkills.add( SkillFactory.createActiveSkill( "LOD" ) );
		
		ArrayList<Skill> summonerSkills2 = new ArrayList<Skill>();
//		summonerSkills2.add( SkillFactory.createSkill( "observation" ) );
//		summonerSkills2.add( SkillFactory.createSkill( "bargain" ) );
		
		HashMap< String, ActiveSkill > weaponSkills2 = new HashMap<String, ActiveSkill>();
		weaponSkills2.put("staff", staff);
		weaponSkills2.put("unarmed", unarmed);
		
		Occupation summoner = new Occupation( summonerStats, OccupationType.SUMMONER, summonerSkills, weaponSkills2, summonerSkills2 );
		OccupationFactory.addOccupation( summoner );
		
		// Sneak
		StatList sneakStats = new EntityStatList();
//		sneakStats.addStat( StatType.MVT, 5 );
		sneakStats.addStat( StatType.AGI, 5 );
		sneakStats.addStat( StatType.VISIBILITY, 1 );
		
		ArrayList<ActiveSkill> sneakSkills = new ArrayList<ActiveSkill>();
		
		sneakSkills.add( oneHanded );
		sneakSkills.add( unarmed );
		ActiveSkill ranged = SkillFactory.createActiveSkill( "ranged" );
		sneakSkills.add( ranged );
		sneakSkills.add( SkillFactory.createActiveSkill( "bindWounds" ) );
		sneakSkills.add( SkillFactory.createActiveSkill( "LOD" ) );
		
		ArrayList<Skill> sneakSkills2 = new ArrayList<Skill>();
		sneakSkills2.add( SkillFactory.createSkill( "pickPocket" ) );
		sneakSkills2.add( SkillFactory.createSkill( "detectTrap" ) );
		sneakSkills2.add( SkillFactory.createSkill( "removeTrap" ) );
//		sneakSkills2.add( SkillFactory.createSkill( "observation" ) );
//		sneakSkills2.add( SkillFactory.createSkill( "bargain" ) );
		
		HashMap< String, ActiveSkill > weaponSkills3 = new HashMap<String, ActiveSkill>();
		weaponSkills3.put( "ranged", ranged );
		weaponSkills3.put("oneHanded", oneHanded);
		weaponSkills3.put("unarmed", unarmed);
		
		Occupation sneak = new Occupation( sneakStats, OccupationType.SNEAK, sneakSkills, weaponSkills3, sneakSkills2 );
		OccupationFactory.addOccupation( sneak );
		
		// Theseus
		StatList theseusStats = new EntityStatList();
		theseusStats.addStat( StatType.MVT, 5 );
		theseusStats.addStat( StatType.AGI, 5 );
		theseusStats.addStat( StatType.STR, 5 );
		theseusStats.addStat( StatType.HAR, 5 );
		theseusStats.addStat( StatType.INT, 5 );
		theseusStats.addStat( StatType.VISIBILITY, 5 );
		
		ArrayList<ActiveSkill> theseusSkills = new ArrayList<ActiveSkill>();
		
		theseusSkills.add( unarmed );
		theseusSkills.add( SkillFactory.createActiveSkill( "fireBall" ) );
		theseusSkills.add( SkillFactory.createActiveSkill( "iceWave" ) );
		theseusSkills.add( SkillFactory.createActiveSkill( "earthQuake" ) );
		theseusSkills.add( SkillFactory.createActiveSkill( "healingLight" ) );
//		theseusSkills.add( SkillFactory.createActiveSkill( "berserk" ) );
//		theseusSkills.add( SkillFactory.createActiveSkill( "protect" ) );
		theseusSkills.add( SkillFactory.createActiveSkill( "bindWounds" ) );
		
		ArrayList<Skill> theseusSkills2 = new ArrayList<Skill>();
//		theseusSkills2.add( SkillFactory.createSkill( "observation" ) );
//		theseusSkills2.add( SkillFactory.createSkill( "bargain" ) );
		
		HashMap< String, ActiveSkill > weaponSkills4 = new HashMap<String, ActiveSkill>();
		weaponSkills4.put("unarmed", unarmed);
		
		Occupation theseus = new Occupation( theseusStats, OccupationType.THESEUS, theseusSkills, weaponSkills4, theseusSkills2 );
		OccupationFactory.addOccupation( theseus );
		
		// Monster
		StatList monsterStats = new EntityStatList();
		monsterStats.update( StatType.LIVES, -4 );
		
		ArrayList<ActiveSkill> monsterSkills = new ArrayList<ActiveSkill>();
		
		monsterSkills.add( unarmed );
		monsterSkills.add( SkillFactory.createActiveSkill( "fireBall" ) );
		monsterSkills.add( SkillFactory.createActiveSkill( "iceWave" ) );
//		monsterSkills.add( SkillFactory.createActiveSkill( "berserk" ) );
		monsterSkills.add( SkillFactory.createActiveSkill( "bindWounds" ) );
		
		ArrayList<Skill> monsterSkills2 = new ArrayList<Skill>();
//		monsterSkills2.add( SkillFactory.createSkill( "observation" ) );
//		monsterSkills2.add( SkillFactory.createSkill( "bargain" ) );
		
		HashMap< String, ActiveSkill > weaponSkills5 = new HashMap<String, ActiveSkill>();
		weaponSkills5.put("unarmed", unarmed);
		
		Occupation monster = new Occupation( monsterStats, OccupationType.MONSTER, monsterSkills, weaponSkills5, monsterSkills2 );
		OccupationFactory.addOccupation( monster );
	}
}

